package com.xiaoshuidi.cloud.module.iot.controller.admin.callback;

import com.alibaba.fastjson.JSONObject;
import com.xiaoshuidi.cloud.module.iot.dal.model.callback.AikeDeviceCallbackResVO;
import com.xiaoshuidi.cloud.module.iot.service.AikeCallbackService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("callback/aike")
public class AikeDeviceController {
    private Logger LOGGER = LoggerFactory.getLogger(AikeDeviceController.class);
    @Autowired
    private AikeCallbackService aikeCallbackService;

    @PostMapping("/getMeterReading")
    public AikeDeviceCallbackResVO getMeterReading(@RequestBody JSONObject object) throws Exception {
        AikeDeviceCallbackResVO callbackResVO = aikeCallbackService.getMeterReading(object);
        return callbackResVO;
    }


}
